/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.company.primitivies;

/**
 *
 * @author admin
 */
public class Point2d {

    private double x;
    private double y;

       
    public Point2d clone() {
        return new Point2d(this.x, this.y);
    }

    @Override
    public boolean equals(Object o) {
        Point2d point = (Point2d) o;
        if (Math.abs(point.getX() - x) <=0.002 && Math.abs(point.getY() - y) <= 0.002) {
            return true;
        }
        return false;
    }

    public Point2d() {
    }

    public Point2d(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public double getX() {
        return x;
    }

    public double getY() {
        return y;
    }

    public void setX(double x) {
        this.x = x;
    }

    public void setY(double y) {
        this.y = y;
    }

}
